package day09.task.carRental;

import java.util.Scanner;
public class CarCompanyTest {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        while (true) {
            System.out.println("i请输入要组的车型1、轿车；2、客车；3、退出");
            int choose = sc.nextInt();
            if (choose == 1) {
                System.out.println("请输入租车数量，要租车型的代号：1、别克；2、宝马；3、别克林荫大道");
                Carcompany car = new Car(sc.nextInt(), sc.nextInt());
                System.out.println("请输入租车天数");
                System.out.println("共需花费："+car.vehicleRental(sc.nextInt()));
            } else if(choose==2){
                System.out.println("请输入租车数量，客车的座位数 ");
                Carcompany bus = new Bus(sc.nextInt(), sc.nextInt());
                System.out.println("请输入租车天数");
                System.out.println("共需花费："+bus.vehicleRental(sc.nextInt()));
            }else{
                System.out.println("系统已退出");
                break;
            }
        }
    }
}
